{* Smarty *}
{*
 *  This file is part of Urd.
 *
 *  Urd is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *  Urd is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program. See the file "COPYING". If it does not
 *  exist, see <http://www.gnu.org/licenses/>.
 *
 * $LastChangedDate: 2008-06-14 11:01:35 +0200 (Sat, 14 Jun 2008) $
 * $Rev: 1161 $
 * $Author: styck $
 * $Id: ajax_showstatus.tpl 1161 2008-06-14 09:01:35Z styck $
 *}

{* Ajax page, doesn't need a head/foot tpl *}
<h2>{$LN_preview_header}</h2>
{if $finished == 0}
	<img src="{$IMGDIR}/waiting.png" alt="Loading"/><br/>

	{* Show progress bar: *}
	{strip}
		<img src="{$IMGDIR}/left.png" height="10" width="2" alt="left"/>
		<img src="{$IMGDIR}/light.png" height="10" width="{$progress}" alt="progressbar"/>
		<img src="{$IMGDIR}/dark.png" height="10" width="{math equation="100 - a" a=$progress}" alt="progressbar"/>
		<img src="{$IMGDIR}/right.png" height="10" width="2" alt="right"/>
	{/strip}
	<br/>
	<span class="progress">{$progress}%</span>
{elseif $finished == -1 || $nroffiles == 0}
	{$LN_preview_failed}
	<p>
	<a href="javascript:window.close();">{$LN_preview_close}</a> 
	</p>
{else}
	{if $nroffiles == 1}
		<input type="hidden" value="{$do_reload}" id="do_reload"/>
		{if $isnzb eq 0}
			{$LN_preview_autodisp}<br/>
			{$LN_preview_autofail}<br/>
			<a href="getfile.php?file={$path|escape}{$file|escape}">{$file_utf8}</a>
			<input type="hidden" name="redirect" id="redirect" value="getfile.php?preview&amp;file={$path|escape:url}{$file|escape:url}"/>
		{else }
			{$LN_preview_view}<br/>
			<a href="getfile.php?preview&amp;file={$path|escape}{$file|escape}">{$file_utf8}</a><br/>
			<p>
			{$LN_preview_nzb}<br/>
			<a href="parsenzb.php?file={$path|escape}{$file|escape}">{$file_utf8}</a></p>
		{/if}
	{else}
		{$LN_preview_autodisp}<br/>
		{$LN_preview_autofail}<br/>
		<a href="viewfiles.php?dir={$path|escape}">{$path}</a>
		<input type="hidden" name="redirect" id="redirect" value="viewfiles.php?dir={$path|escape}"/>
	{/if}
{/if}
